package com.laiketui.plugin.common.mapper;

import com.laiketui.plugin.common.domain.auction.AuctionRecordModel;
import com.laiketui.core.db.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 竞拍出价记录
 *
 * @author Trick
 * @date 2022/7/21 15:34
 */
public interface AuctionRecordModelMapper extends BaseMapper<AuctionRecordModel> {


    /**
     * 获取竞拍记录信息
     *
     * @param map -
     * @return List
     * @author Trick
     * @date 2021/4/22 16:27
     */
    List<Map<String, Object>> selectAuctionRecordInfo(Map<String, Object> map);

    int countAuctionRecordInfo(Map<String, Object> map);


    /**
     * 获取当前竞拍商品拍卖人数
     */
    @Select("select count(distinct user_id) from lkt_auction_record where store_id =#{storeId} and auction_id=#{acId} ")
    int getRecordNumByUserId(int storeId,int acId);
}